set a=%cd%
set outpath=%a%\..\GennesisGameClient\Assets\HotUpdate\PB
set propath=%a%\protos

echo "GOPATH= %GOPATH%"

set d=protoc.exe


if exist %outpath% (
    for /f "delims=" %%i in ('dir /b "%outpath%\*.cs"') do (
            echo del file%%i
            del %outpath%\%%i
    )
) else (
    echo create dir%%i
    md csharp %a%
)

for /f "delims="  %%i in ('dir /b proto "%propath%\*.proto"') do (
	echo create %%i
	%d% -I=%propath% --csharp_out=%outpath% %%i
) 


pause


